<html><head><title>ClearGadgetItems</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">ClearGadgetItems()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#3A3966"><b>ClearGadgetItems</b></font>(#Gadget)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Clears all the items from the specified gadget. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Gadget</i></td>
<td width="90%"> 
The gadget to clear. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Remarks</b></p><blockquote>

The Gadget must be one of the following types: 
<br>
<br>
- <a href="comboboxgadget.html">ComboBoxGadget()</a> 
<br>
- <a href="editorgadget.html">EditorGadget()</a> 
<br>
- <a href="listicongadget.html">ListIconGadget()</a> 
<br>
- <a href="listviewgadget.html">ListViewGadget()</a> 
<br>
- <a href="mdigadget.html">MDIGadget()</a> 
<br>
- <a href="panelgadget.html">PanelGadget()</a> 
<br>
- <a href="treegadget.html">TreeGadget()</a> 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 220, 150, &quot;ClearGadgetItems&quot;, <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#3A3966">    ListViewGadget</font>(0,10,10,200,100)
    <b><font color="#3A3966">For</font></b> a = 1 <b><font color="#3A3966">To</font></b> 10 :<font color="#3A3966"> AddGadgetItem </font>(0, -1, &quot;Item &quot;+<font color="#3A3966">Str</font>(a)) : <b><font color="#3A3966">Next</font></b>    <font color="#3A3966">; add 10 items</font>
<font color="#3A3966">    ButtonGadget</font>(1, 10, 120, 150, 20, &quot;Clear Listview contents&quot;)
    <b><font color="#3A3966">Repeat</font></b>
      Event =<font color="#3A3966"> WaitWindowEvent</font>()
      <b><font color="#3A3966">If</font></b> Event = <font color="#924B72">#PB_Event_Gadget</font>
        <b><font color="#3A3966">If</font></b> <font color="#3A3966">EventGadget</font>() = 1
<font color="#3A3966">          ClearGadgetItems</font>(0)
        <b><font color="#3A3966">EndIf</font></b>
      <b><font color="#3A3966">EndIf</font></b>
    <b><font color="#3A3966">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="addgadgetitem.html">AddGadgetItem()</a>, <a href="removegadgetitem.html">RemoveGadgetItem()</a>, <a href="countgadgetitems.html">CountGadgetItems()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=cleargadgetitemlist.html>ClearGadgetItemList()</a> - <a href="index.html">Gadget Index</a> - <a href="closegadgetlist.html">CloseGadgetList()</a> -><br><br>

</body></html>